#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<ctime>
using namespace std;
const int N = 1e5 + 10;
int n;
int a[N];
int tmp[N];
int get_random(int left, int right)
{
	return a[rand() % (right - left + 1)+left];
}
void quick_sort(int left, int right) 
{
	if (left >= right)return;
	int p = get_random(left, right);
	int left1 = left - 1, i = left, right1 = right + 1;
	while (i < right1)
	{
		if (a[i] < p)swap(a[++left1], a[i++]);
		else if (a[i] == p)i++;
		else swap(a[--right1], a[i]);
	}
	//[left,left1],[left1+1,right1-1],[right1,right];
	quick_sort(left, left1);
	quick_sort(right1, right);

}
void merge_sort(int left, int right)
{
	if (left >= right)return;
	int mid = (right + left) >> 1;
	merge_sort(left, mid);
	merge_sort(mid + 1, right);

	int cur1 = left, cur2 = mid + 1, i = left;
	while (cur1 <= mid && cur2 <= right)
	{
		if (a[cur1] <= a[cur2])tmp[i++] = a[cur1++];
		else tmp[i++] = a[cur2++];

	}
	while (cur1 <= mid)tmp[i++] = a[cur1++];
	while (cur2 <= right)tmp[i++] = a[cur2++];

	for (int j = left; j <= right; j++)
	{
		a[j] = tmp[j];
	}
}
int main()
{
	srand(time(0));
	cin >> n;
	for (int i = 1; i <= n; i++)cin >> a[i];
	//quick_sort(1,n);
	merge_sort(1,n);
	for (int i = 1; i <= n; i++)cout<< a[i]<<" ";

	return 0;
}